.layui-layout-admin {

  .layui-logo {
    width: auto;
    height: $header-height;
    padding: 0 20px;
    line-height: $header-height;
    // transition: color $transition-duration, background-color $transition-duration, width $transition-duration, padding $transition-duration;
    transition: all $transition-duration;

    img {
      max-height: 1em;
    }

    span {
      padding-left: 4px;
      vertical-align: middle;
      font-size: 18px;
      letter-spacing: .3px;
    }
  }

  .layui-header {
    height: $header-height;
    line-height: $header-height;
    background-color: $header-bg;
    // border-bottom: 1px solid $border-lighter-color;
    box-shadow: 0 1px 4px rgba($color-black, .04);
    transition: width .3s, left .3s;

    // 移除定位模式
    // @include clearfix;

    // .layui-logo,
    // .layui-layout-left,
    // .layui-layout-right {
    //   position: relative !important;
    //   top: auto;
    //   right: auto;
    //   left: auto;
    //   float: left;
    // }

    // .layui-layout-right {
    //   float: right;
    // }

    .layui-nav {
      height: $header-height;
      color: inherit;

      .layui-nav-item {
        height: 100%;
        line-height: $header-height;

        a {
          height: 100%;
          padding: 0 $space;
          color: inherit;
          transition: all $transition-duration;

          &:hover {
            background-color: $color-gray-f600;
          }
        }

        .layui-nav-more {
          display: none;
        }

        // .layui-icon {
        //   position: relative;
        //   top: 1px;
        //   font-size: 16px;
        // }
      }

      .layui-nav-child {
        top: $header-height + 5;
        min-width: 110px;
        border: none;
        border-radius: 4px;
        box-shadow: 0 6px 16px -8px rgba($color-black, .08), 0 9px 28px 0 rgba($color-black, .05), 0 12px 48px 16px rgba($color-black, .03);

        // a:active {
        //   @extend %link-active;
        // }
      }

      // .layui-badge-dot {
      //   left: 50%;
      //   margin-left: 2px;
      // }

      // .layui-nav-more {
      //   border-top-color: $text-color;

      //   &.layui-nav-mored {
      //     border-color: transparent transparent $text-color;
      //   }
      // }

      // .layui-nav-bar {
      //   top: 0 !important;
      //   height: 2px !important;
      //   background-color: $text-color !important;
      // }

      // &.layui-layout-right .layui-nav-child {
      //   left: auto;
      //   right: 0;
      // }
    }
  }

  .layui-side {
    top: 0;
    z-index: 1001;
    width: $side-width;
    padding-top: $header-height;
    padding-bottom: $side-item-height;
    background-color: $side-bg;
    color: $text-color;
    transition: width .3s, transform .3s, left .3s;

    .layui-logo {
      min-width: $side-width;
      color: $color-white;
      box-shadow: 0 1px 2px rgba($color-black, .2);
    }

    .layui-nav {
      width: $side-width;
      color: inherit;
      background-color: transparent;

      &.layui-nav-tree {
        .layui-nav-item {
          a {
            // padding-left: 45px;
            // padding-right: 30px;
            padding: 0 30px 0 45px;

            &:hover {
              background-color: transparent;
            }
          }

          > a {
            height: $side-item-height;
            line-height: $side-item-height;
          }

          // &.has-submenu a:after,
          i {
            position: absolute;
            top: 50%;
            left: 20px;
            display: inline-block;
            height: $side-item-height;
            line-height: $side-item-height;
            margin-top: $side-item-height * -.5;
            padding: 0;
          }

          // &.has-submenu a:after {
          //   content: "\e602";
          //   right: 20px;
          //   font-family: "layui-icon" !important;
          //   font-size: 14px;
          // }

          // i {
          //   left: 20px;
          // }
        }

        .layui-nav-child {
          padding-top: 5px;
          padding-bottom: 5px;
        }
      }
    }

    .layadmin-side-toggle {
      position: absolute;
      bottom: 0;
      width: 100%;
      border-top: 1px solid rgba($color-black, .25);
    }
  }

  .layui-body {
    top: $header-height;
    left: $side-width;
    padding-bottom: 0;
    overflow: hidden;
    transition: left .3s;

    &.has-footer {
      padding-bottom: $footer-height;
    }

    &.layui-tab {
      margin: 0;
      // border-radius: 0;
      // border: none;

      .layui-tab-title {
        position: absolute;
        width: 100%;
        height: $pagetabs-height;
        border: none;
        // background-color: $color-white;
        // z-index: 100;
        box-shadow: 0 1px 2px 0 rgba($color-black, .1);

        li {
          min-width: $pagetabs-height + 5;
          height: $pagetabs-height;
          line-height: $pagetabs-height;
          vertical-align: auto;

          &:after {
            // content: "\20";
            // position: absolute;
            // left: 0;
            // top: 0;
            // width: 100%;
            height: 2px;
            border: none;
            border-radius: 0;
            background-color: $side-bg;
            transform: scale(0);
            transition: transform .3s;
          }

          &.layui-this {
            color: $side-bg;
            background-color: $pagetabs-hover-bg;
          }

          &:hover:after,
          &.layui-this:after {
            transform: scale(1);
          }

          &:first-child .layui-tab-close {
            @extend %display-none;
          }

          & .layui-tab-close {
            border-radius: 50%;
            transform: scale(.85);

            &:hover {
              background-color: $color-gray-c900;
            }
          }
        }

        .layui-tab-bar {
          border: none;
          border-radius: 0;
          height: $pagetabs-height;
          line-height: $pagetabs-height;
          box-shadow: -1px 0 8px rgba($color-black,.08);

          .layui-icon {
            top: 0;
            color: $color-gray-c200;
            transform: scale(.85);
          }
        }

        &.layui-tab-more .layui-tab-bar {
          box-shadow: none;

          .layui-icon {
            transform: scale(.85) rotate(180deg);
          }
        }
      }

      .layui-tab-content {
        // position: absolute;
        // top: $pagetabs-height;
        // bottom: 0;
        // width: 100%;
        height: 100%;
        padding: 0;
        // background-color: $body-bg;
      }

      .layui-tab-item,
      .layui-tab-item > iframe {
        width: 100%;
        height: 100%;
      }

      .layui-tab-more .layui-this {
        color: $text-color;
      }

      &.has-pagetabs .layui-tab-content {
        padding-top: $pagetabs-height;
      }
    }
  }

  .layui-footer {
    left: $side-width;
    height: $footer-height;
    padding: 0 $space-lg;
    line-height: $footer-height;

    > * {
      vertical-align: middle;
      margin-right: 5px;
      margin-left: 5px;
    }
  }

  // 收缩后
  &.layadmin-layout-shrink {
    .layui-side.layadmin-side,
    .layui-side[data-level="1"],
    .layui-side[data-level="1"] .layui-nav,
    .layui-side .layadmin-btn-flexible {
      width: $side-shrink-width;
    }

    .layui-side .layadmin-btn-flexible .layui-icon {
      font-size: 18px;
    }

    .layui-side[data-level="1"] {
      .layui-side-scroll {
        width: $side-shrink-width + 20;
      }

      .layui-nav.layui-nav-tree .layui-nav-item a {
        padding: 0;
        text-align: center;

        cite,
        &:after {
          display: none;
        }

        i {
          font-size: 18px;
        }
      }
    }

    .layui-header {
      left: 0;
    }

    .layui-body {
      left: $side-shrink-width;
    }
  }

  // 手机
  &.layadmin-layout-mobile {
    .layui-body {
      left: 0;
    }

    .layui-side {
      top: 0;
      z-index: 2001;
      width: $side-width;
      transform: translate3d(0, 0, 0);
    }

    .layadmin-body-shade {
      display: block;
    }

    &.layadmin-layout-shrink {

      .layui-side {
        width: $side-width;
        transform: translate3d(-1 * $side-width, 0, 0);
      }

      .layadmin-body-shade {
        display: none;
      }
    }
  }

  // @include respond(xs) {
  //   .layui-logo {
  //     width: 100%;
  //     height: $header-mobile-height / 2;
  //     line-height: $header-mobile-height / 2;
  //     min-width: 0;
  //   }

  //   .layui-header {
  //     height: $header-mobile-height;

  //     .layui-nav {
  //       height: $header-mobile-height / 2;

  //       .layui-nav-item {
  //         height: 100%;
  //         line-height: $header-mobile-height / 2;
  //         vertical-align: top;

  //         a {
  //           height: 100%;
  //           line-height: $header-mobile-height / 2;
  //         }
  //       }

  //       .layui-nav-child {
  //         top: $header-mobile-height / 2 + 5;
  //       }
  //     }
  //   }

  //   .layui-body {
  //     top: $header-mobile-height;
  //   }
  // }
}
